<!--
 * @Description: 返回组件
 * @Author: xinqiao lxq1990.0716@qq.com
 * @Date: 2025-04-30
 * @LastEditors: xinqiao lxq1990.0716@qq.com
 * @LastEditTime: 2025-05-27
-->

<script lang="ts" setup>
  import { ArrowLeftOutlined } from '@ant-design/icons-vue'
  import { useRouter } from 'vue-router'

  const props = defineProps({
    title: { type: String, default: '详情' },
    bottomSplit: { type: Boolean, default: true },
  })

  const router = useRouter()
</script>

<template>
  <div class="back" :class="{ 'bottom-split': bottomSplit }">
    <ArrowLeftOutlined :style="{ 'font-weight': 'bold', 'margin-right': '12px' }" @click="router.back()" />
    <span>{{ props.title }}</span>
  </div>
</template>

<style lang="less" scoped>
  .back {
    display: flex;
    align-items: center;
    height: 70px;
    padding-left: 24px;
    font-size: 18px;
    font-weight: 500;
    color: #000;

    &.bottom-split {
      border-bottom: 1px solid #e6e6e6;
    }
  }
</style>
